import {baseUrl} from "@/config/env";
import startSearchModel from "@/config/startSearchModel";

export default () => {
    return {
        submitText: '修改',
        size: 'default',
        labelWidth: 80,
        index: true,
        menuType: "menu",
        menuAlign: 'center',
        menuPosition: "right",
        searchIndex: 2,
        searchMenuSpan: 6,
        searchIcon: true,
        permissionBtn: {
            addBtn: 'sys:role:add',
            editBtn: 'sys:role:edit',
            viewBtn: 'sys:role:info',
            delBtn: 'sys:role:delete',
            delRoleDataRuleBtn: 'sys:role:delete',
        },
        column: [
            {
                label: '名称',
                span: 12,
                prop: 'roleName',
                search: true,
                searchModel: startSearchModel.LIKE_RIGHT,
            },
            {
                label: '父级',
                span: 12,
                prop: 'parentId',
                slot: false,
                showColumn: false,
                type: "tree",
                search: true,
                dicUrl: baseUrl + "/start/sysRole/listTree",
                props: {
                    label: "roleName",
                    value: "id"
                }
            },
            {
                label: '编码',
                span: 12,
                prop: 'roleCode',
                slot: false,
                search: true,
                searchModel: startSearchModel.LIKE_RIGHT,
            },

        ]
    }
}
